package com.java.grammer.constructer.exer1;

/**
 * @author luzhikun
 * @date 2020/12/5- 11:16
 */
public class Animal_2 {
    private int age;
    private String name;
    private int leg;

    public Animal_2() {

    }

    public Animal_2(int age, String name, int lge) {
        this.age = age;
        this.name = name;
        this.leg = lge;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLeg() {
        return leg;
    }

    public void setLeg(int leg) {
        this.leg = leg;
    }

    public void getEat() {
        System.out.println("动物进食");
    }

    public void getSleep() {
        System.out.println("动物需要睡觉");
    }
}
